<h1>Listing trainings</h1>

<table>
  <tr>
    <th>Start date</th>
    <th>End date</th>
  </tr>

<% @trainings.each do |training| %>
  <tr>
    <td><%=h training.start_date %></td>
    <td><%=h training.end_date %></td>
    <td><%= link_to 'Show', training %></td>
    <td><%= link_to 'Edit', edit_training_path(training) %></td>
    <td><%= link_to 'Destroy', training, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New training', new_training_path %>